Skip to content

HAR-9797 - feat: added initial support for high contrast mode#552

Merged
harbournick merged 8 commits intodevelopfrom
feat/high-contrast-mode
Jun 5, 2025
Merged

HAR-9797 - feat: added initial support for high contrast mode#552
harbournick merged 8 commits intodevelopfrom
feat/high-contrast-mode

Conversation

@chittolinag
Copy link
Copy Markdown
Contributor

@chittolinag chittolinag commented Jun 4, 2025

Added support for high contrast mode.

  • When enabled, the toolbar and the editor borders should have maximum contrast.
  • Users can enable/disable it by calling setHighContrastMode on the main SuperDoc instance.

How to enable:

const config = {
  // ...
  onReady: (event) => {
    event.superdoc.setHighContrastMode(true);
  }
  // ...
}

const editor = new SuperDoc(config);
// Or at any point (after the editor is ready)
editor.setHighContrastMode(true);

This function can be called programatically at any point.

UI changes:

  • Toolbar items (hover state, dropdowns).
  • Editor borders.
Screenshot 2025-06-05 at 11 14 13

@chittolinag chittolinag changed the title (WIP) feat: added initial support for high contrast mode HAR-9797 - feat: added initial support for high contrast mode Jun 5, 2025
@chittolinag chittolinag marked this pull request as ready for review June 5, 2025 14:01
@chittolinag chittolinag requested a review from harbournick June 5, 2025 14:01
Copy link
Copy Markdown
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one quick comment on the package-lock that looks to be unintended

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove any changes in this lock file unless strictly necessary to prevent any potential issues with install (we've had issues with unintentional changes in lock files)

@harbournick harbournick requested a review from artem-harbour June 5, 2025 15:45
@chittolinag chittolinag requested a review from harbournick June 5, 2025 18:06
@chittolinag
Copy link
Copy Markdown
Contributor Author

@artem-harbour @harbournick The idea I came up with for now is to keep two composables, one for superdoc, one for supereditor. We do have to change colors on both packages, but given the timeline I couldn't really figure out a way to keep a same shared state - but I'm super open to suggestions in case you know a better approach to do so!

@harbournick harbournick changed the base branch from main to develop June 5, 2025 23:13
Copy link
Copy Markdown
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harbournick harbournick merged commit 6d07b8d into develop Jun 5, 2025
5 of 6 checks passed
@harbournick harbournick deleted the feat/high-contrast-mode branch June 5, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants